/*
 * test_multiSuper.c
 *
 *  Created on: Aug 12, 2011
 *      Author: Jesse Meng
 */
#include "OOStd.h"

CLASS_RAW(A1){
	int a1;
};
static int resetA1(A1* t){
	t->a1=100;
	return 100;
}
ASM_C0(A1,resetA1,NULL)

CLASS_RAW(A2){
	int a2;
};
static int resetA2(A2* t){
	t->a2=200;
	return 200;
}
ASM_C0(A2,resetA2,NULL)

CLASS_RAW(B){
	CLASS_RAW_EX(A1);
	CLASS_RAW_EX(A2);
	int b;
};
static int resetB(B* t){
	CLASS_SU_INI0(t,A1);
	CLASS_SU_INI0(t,A2);
	t->b=300;
	return 300;
}
ASM_C0(B,resetB,NULL)
static int showB(const B* t){
	printf("a1,a2,b : %d,%d,%d",
			t->A1.a1,
			t->A2.a2,
			t->b);
	return 0;
}
static int procB(B *t,void *p,unsigned int ret,unsigned int ext){
	printf("\nprocB: %p %d %d\n",t,ret,ext);
	return 0;
}


int main(){

	B *b=NEW_EX0(B,128,procB);//NEW0(B);
	showB(b);
	DEL0(b,B);
	return 0;
}
